﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace TaskFramework.Tests
{
    [TestFixture]
    public class TaskInfoFixture
    {
        [Test]
        public void should_ensure_that_a_root_task_is_flagged_correctly()
        {
            Task task = new QuickTask(new QuickTaskRequest());
            TaskInfo info = new TaskInfo(task, null);

            Assert.IsTrue(info.IsRootTask);
        }

        [Test]
        public void should_ensure_that_a_non_root_task_is_flagged_correctly()
        {
            Task task = new QuickTask(new QuickTaskRequest());
            TaskInfo info = new TaskInfo(task, null, task.TaskId - 1);

            Assert.IsFalse(info.IsRootTask);
        }
    }
}
